xen.git
19 years agoFix network bridge script to select the right interface when bridge already exists.
cl349@firebug.cl.cam.ac.uk [Thu, 11 May 2006 21:39:44 +0000 (22:39 +0100)]
Fix network bridge script to select the right interface when bridge already exists.
If the bridge is already configure, the default route will point
to a xenbr interface and not an eth interface.  Handle this case.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agoAdd support to domain builders for loading kernels with physical addresses in the...
cl349@firebug.cl.cam.ac.uk [Thu, 11 May 2006 16:30:50 +0000 (17:30 +0100)]
Add support to domain builders for loading kernels with physical addresses in the elf paddr and entry fields.
Add a new __xen_guest header field to distinguish between kernels with
the previous use of the paddr field and the new use.
Add a new __xen_guest header field to control the kernel entry point,
since the elf header entry field now points to a physical address.
This header field is also useful for supporting alternative entry
points in kernel images which run both on xen and native.
Also add a kernel config option to control whether the resulting kernel
should include compatibility code to run on Xen 3.0.2 or whether such
code such be left out, resulting in a kernel which will only run on
newer Xen versions.  Default to having compatibility enabled.
Kernels built with the new use of the elf header fields would otherwise
not work on Xen versions prior to this changeset.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agodom0 and anonymous connections can create unlimited sized entries in the store.
vhanquez@kneesa.uk.xensource.com [Thu, 11 May 2006 14:51:56 +0000 (15:51 +0100)]
dom0 and anonymous connections can create unlimited sized entries in the store.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
19 years agoTry to create runtime xenstored's directories at startup time.
vhanquez@kneesa.uk.xensource.com [Thu, 11 May 2006 14:01:54 +0000 (15:01 +0100)]
Try to create runtime xenstored's directories at startup time.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
19 years agoFix up enforce_dom0_cpu test case to check that dom0 has at least 2 vcpus
Ryan Harper [Thu, 11 May 2006 12:49:20 +0000 (13:49 +0100)]
Fix up enforce_dom0_cpu test case to check that dom0 has at least 2 vcpus
online.  Also fix bogus call to vcpu-enable; xm now uses vcpu-set as method for
enable/disable of vcpus.  Previously after a successful test run, this test
would not leave dom0 in the same state as it was when the test started.  Also
some comment language changes and 80 column formatting.

19 years agox86/64 has the wrong number of arguments defined for HYPERVISOR_xenoprof_op.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 May 2006 12:45:10 +0000 (13:45 +0100)]
x86/64 has the wrong number of arguments defined for HYPERVISOR_xenoprof_op.
Signed-off-by: Ray Bryant <raybry@mpdtxmail.amd.com>
19 years agoI am adding one more test case for vTPM migration. The new one does
kaf24@firebug.cl.cam.ac.uk [Thu, 11 May 2006 12:43:09 +0000 (13:43 +0100)]
I am adding one more test case for vTPM migration. The new one does
local network migration without the 'live' parameter 3 times. The test
'04' that does live migration now tests local live migration 3 times.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoFix the building of the Xen TPM driver as module and prevents front-
kaf24@firebug.cl.cam.ac.uk [Thu, 11 May 2006 12:42:20 +0000 (13:42 +0100)]
Fix the building of the Xen TPM driver as module and prevents front-
and backends to be rmmod'ed by removing their module_exit line.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoFix a typo in xc_ptrace() and fix single-stepping when attached
kaf24@firebug.cl.cam.ac.uk [Thu, 11 May 2006 10:33:07 +0000 (11:33 +0100)]
Fix a typo in xc_ptrace() and fix single-stepping when attached
to a live guest.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoWhen we copy packet sin netback/netfront make sure the new skb has
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 16:30:42 +0000 (17:30 +0100)]
When we copy packet sin netback/netfront make sure the new skb has
all the necessary fields initialised. In particular, before we were
not copying ip_summed and that screws up checksum offload.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoThis patch adds a boolean parameter 'network' to the save method of the
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 15:52:55 +0000 (16:52 +0100)]
This patch adds a boolean parameter 'network' to the save method of the
XendCheckpoint class to differentiate between network suspend/resume
(network=True) and local suspend/resume (network=False).
Instead of passing the 'live' parameter to the migration methods, this
'network' parameter is passed now. This ends up being merely a renaming
of the parameter.
A check with the xm-test suite against this change has resulted in no
additional errors.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoSimply do not declare module_exit() handlers for netback/blkback, rather
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 15:47:00 +0000 (16:47 +0100)]
Simply do not declare module_exit() handlers for netback/blkback, rather
than declaring the modules unsafe.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoproto_csum_blank field gets lost if packet is copied in netback driver.
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 15:23:22 +0000 (16:23 +0100)]
proto_csum_blank field gets lost if packet is copied in netback driver.
Signed-off-by: James Dykman <dykman@us.ibm.com>
19 years agoThe PciController class lacks a configuration method to re-generate the
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 15:07:46 +0000 (16:07 +0100)]
The PciController class lacks a configuration method to re-generate the
configuration of an existing domain. This is needed for a domain to be
able to reboot and retain its PCI device configuration. This patch adds
such support.

Thanks to Mike Wright for reporting this problem and working with me to
fix it.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
19 years agoThis patch enhances the Summagraphics emulation by adding 2 features:
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 15:06:55 +0000 (16:06 +0100)]
This patch enhances the Summagraphics emulation by adding 2 features:

1)  Move the tablet to the second serial port.  This way the tablet will
not interfere with people who want to use a serial console on the guest.

2)  Enhance the Summagraphics emulation so that the Windows XP driver
works.  Turns out the Windows driver was using capabilities the X driver
didn't care about and it wouldn't recognize the tablet without these
capabilities.

Signed-off-by: donald.d.dugger@intel.com
19 years agoReset Cirrus device model `VRAM' whenever a VGA/SVGA mode switch occurs.
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 15:05:24 +0000 (16:05 +0100)]
Reset Cirrus device model `VRAM' whenever a VGA/SVGA mode switch occurs.

If you change the video resolution on a Windows XP guest such that it uses
fewer bytes of VRAM (either by using fewer bytes per pixel or by lowering the
resolution) then some window backgrounds will become corrupted.  This happens
because the Windows XP Cirrus Logic driver assumes that VRAM is initialized
to 0xff whenever the video mode switches between VGA and SVGA.

Signed-off-by: Donald.D.Dugger@intel.com
19 years agoClean up and refactor some parts of the vTPM and migration-related scripts.
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 15:01:34 +0000 (16:01 +0100)]
Clean up and refactor some parts of the vTPM and migration-related scripts.
In the external device migration script I am introducing a subtype
(-subtype <subtype>) from which the script's name is formed. Also all
unparsed parameters are passed to the called script.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoFix a couple of problems in the TPM backend driver.
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 14:58:16 +0000 (15:58 +0100)]
Fix a couple of problems in the TPM backend driver.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoThis small patch fixes new make-dependencies of the secpol_tool
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 14:49:47 +0000 (15:49 +0100)]
This small patch fixes new make-dependencies of the secpol_tool

Signed-off by: Reiner Sailer <sailer@us.ibm.com>

19 years agoSet up and tear down phys_proc_id, cpu_core_id, cpu_sibling_map
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 14:44:56 +0000 (15:44 +0100)]
Set up and tear down phys_proc_id, cpu_core_id, cpu_sibling_map
and cpu_core_map when CPUs come online and go offline.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoFix blkif and netif backend teardown -- do not remove devices from
kaf24@firebug.cl.cam.ac.uk [Wed, 10 May 2006 12:27:17 +0000 (13:27 +0100)]
Fix blkif and netif backend teardown -- do not remove devices from
sysfs (and hence trigger hotplug callbacks) until the devices really
are dead. This fixes a bug where the deferred code to free a blk
device was running concurrently with a hotplug-remove callback which
would try to reclaim the underlying storage. In some cases the race
would be lost and the hotplug script would fail.

Thanks to the Zhu Han at Intel for finding the root cause of this
long-term and annoying bug!

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoFix PAE build: add CONFIG_I2O_EXT_ADAPTEC_DMA64=y to linux-defconfig_xen_x86_32.
cl349@firebug.cl.cam.ac.uk [Mon, 8 May 2006 18:21:41 +0000 (19:21 +0100)]
Fix PAE build: add CONFIG_I2O_EXT_ADAPTEC_DMA64=y to linux-defconfig_xen_x86_32.

From: Nakajima, Jun <jun.nakajima@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agoMake cscope hgignore wildcard a little bit less permissive.
cl349@firebug.cl.cam.ac.uk [Mon, 8 May 2006 16:18:19 +0000 (17:18 +0100)]
Make cscope hgignore wildcard a little bit less permissive.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agoMake Xen version numbers more flexible.
cl349@firebug.cl.cam.ac.uk [Mon, 8 May 2006 15:41:22 +0000 (16:41 +0100)]
Make Xen version numbers more flexible.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agoAdd module license to xenbus_be, otherwise the module cannot be loaded.
kaf24@firebug.cl.cam.ac.uk [Mon, 8 May 2006 13:54:22 +0000 (14:54 +0100)]
Add module license to xenbus_be, otherwise the module cannot be loaded.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
19 years agoThe current Xen code for VMX is setting the gp fault vmexiting in
kaf24@firebug.cl.cam.ac.uk [Mon, 8 May 2006 13:53:09 +0000 (14:53 +0100)]
The current Xen code for VMX is setting the gp fault vmexiting in
the EXCEPTION_BITMAP vmcs control. There is no need for that as VMM is
just plainly re-injecting back to the guest. The attached is a simple
patch to set the vmcs control properly.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
19 years agoFix code which finds the default interface if there are static routes.
cl349@firebug.cl.cam.ac.uk [Mon, 8 May 2006 09:36:13 +0000 (10:36 +0100)]
Fix code which finds the default interface if there are static routes.
The current code will break if there are multiple scope global routes
since the "ip route list default" command doesn't use "default" as a
filter, and will output multiple devices which breaks the rest of the
script.
Also make the vif/xenbr/eth naming consistent, i.e. if your default
network interface is eth1, you get vif1 and xenbr1.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agoThe buildroot xm-test grabs is no longer present, this patch fixes it.
stekloff@dyn9047022152.beaverton.ibm.com [Sun, 7 May 2006 20:41:36 +0000 (21:41 +0100)]
The buildroot xm-test grabs is no longer present, this patch fixes it.
Made it a minor release bump for xm-test so old ramdisk will work. The
ramdisk is functionally the same.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
19 years agoFix console runaway detection for the smallmem_neg test, following the changes
emellor@leeni.uk.xensource.com [Sun, 7 May 2006 13:00:05 +0000 (14:00 +0100)]
Fix console runaway detection for the smallmem_neg test, following the changes
to have Console included as part of the Domain object.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoAbstract block-attach and block-detach calls, and add to that the correct
emellor@leeni.uk.xensource.com [Sun, 7 May 2006 12:34:45 +0000 (13:34 +0100)]
Abstract block-attach and block-detach calls, and add to that the correct
polling waiting for the device to connect and disconnect.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoMove the logic to find the Xen Python scripts above the import statements.
emellor@leeni.uk.xensource.com [Sat, 6 May 2006 14:42:12 +0000 (15:42 +0100)]
Move the logic to find the Xen Python scripts above the import statements.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoMerged.
emellor@leeni.uk.xensource.com [Fri, 5 May 2006 17:36:26 +0000 (18:36 +0100)]
Merged.

19 years agoUse the auxbin module to find the appropriate install directory for our Python
emellor@leeni.uk.xensource.com [Fri, 5 May 2006 17:36:12 +0000 (18:36 +0100)]
Use the auxbin module to find the appropriate install directory for our Python
scripts.

This fixes a bug with xm-test not working on 64-bit systems.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoRemove ssidref field from test -- this now only works if there is a policy in
emellor@leeni.uk.xensource.com [Fri, 5 May 2006 15:46:48 +0000 (16:46 +0100)]
Remove ssidref field from test -- this now only works if there is a policy in
place at the time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoAdd more in_irq() checking. Add irq_enter()/irq_exit() where
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 14:15:56 +0000 (15:15 +0100)]
Add more in_irq() checking. Add irq_enter()/irq_exit() where
they are missing in a few places.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoInstead of just having the bootloader config sxp replace anything else,
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 13:09:07 +0000 (14:09 +0100)]
Instead of just having the bootloader config sxp replace anything else,
merge with given values.  This will allow a bootloader to not have to
specify everything which is useful for bootloaders other than pygrub.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
19 years agoFix injection of guest faults resulting from failed injection of a
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 13:05:31 +0000 (14:05 +0100)]
Fix injection of guest faults resulting from failed injection of a
previous event. We enter an infinite loop if the original failed
injection cannot be fixed up by Xen (e.g., because it's not a shadow
pagetable issue).

   The RHEL4 HVM guest hang issue was actually a side effect of
change-set 9699. In the rhel4 guest hang rc.sysinit init-script was
calls kmodule program to probe the hardware. The kmodule uses the kudzu
library call probeDevices(). For probing the graphics hardware in the
vbe_get_mode_info() function, sets up the environment and goes into the
vm86 mode to do the int x10 call. For returning back to protected mode
it sets up a int 0xff call. At the time of calling the int 0xff the
guest process pages were not filled up. And it was causing an infinite
loop of vmexits with the IDT_VECTORING_INFO on the int 0xff instruction.

        The reason for the infinite loop is changeset 9699. With that
the guest page fault was always getting overridden by the int 0xff gp
fault coming from the IDT_VECTORING_INFO. With the attached patch if VMM
is injecting exceptions like page faults or gp faults then
IDT_VECTORING_INFO field does not override it, and that breaks the
vmexit infinite loop for the rhel4.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
19 years agoFix python pciif script to reference correct 2.0 compatibility variable.
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 13:01:43 +0000 (14:01 +0100)]
Fix python pciif script to reference correct 2.0 compatibility variable.

In the Xen 2.0.x compatibility section of xend (where we try to parse
the s-expressions if they came from an SXP configuration file for Xen
2.0.x), the wrong variable is referenced. This fix corrects the python
script to use the correct variable.

Thanks to Mike Wright for reporting this.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
19 years agoFix dr access from or to extended registers on x86_64.
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 12:59:17 +0000 (13:59 +0100)]
Fix dr access from or to extended registers on x86_64.
Also some cleanups.
Signed-off-by: Xin Li <xin.b.li@intel.com>
19 years agoReplace a bash-specific redirection in tools/ioemu/configure with a
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 12:58:13 +0000 (13:58 +0100)]
Replace a bash-specific redirection in tools/ioemu/configure with a
standard POSIX one which allows the Xen tools to be built with a POSIX
shell other than bash.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years agoIt's unnecessary on MOV CRn to use "q" or "l" to indicate default
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 12:57:16 +0000 (13:57 +0100)]
It's unnecessary on MOV CRn to use "q" or "l"  to indicate default
oparand size.
Signed-off-by: Xin Li <xin.b.li@intel.com>
19 years agoReplace a bash-specific substitution with equivalent POSIX /bin/sh
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 12:51:03 +0000 (13:51 +0100)]
Replace a bash-specific substitution with equivalent POSIX /bin/sh
substitutions.  This allows a Xen-patched Linux to build when /bin/sh
is a POSIX shell other than bash.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years agoAdjust skb->truesize appropriately in netback driver.
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 12:49:49 +0000 (13:49 +0100)]
Adjust skb->truesize appropriately in netback driver.

When you generate non-linear skb's as netback does, it is up to you
to ensure that truesize reflects the size of paged part of the skb.
Otherwise socket memory accounting in Linux falls apart.

Thanks to the new check that David Miller added to TCP we were able
to catch this bug.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years agoFix IA64 transparent-virtualization issue (Xen may not be running).
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 12:46:59 +0000 (13:46 +0100)]
Fix IA64 transparent-virtualization issue (Xen may not be running).
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years agoAdd missing spin_unlock_irq() at xen/arch/x86/irq.c
kaf24@firebug.cl.cam.ac.uk [Fri, 5 May 2006 12:41:35 +0000 (13:41 +0100)]
Add missing spin_unlock_irq() at xen/arch/x86/irq.c

Changeset 9889:42a8e3101c6c reorganized the code on this file, and
missed this spin_unlock_irq().  Without this patch, my machine hangs
completely during boot.  With this, it works.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
19 years agoDon't try to write to pmd pages, there is no writeable-pmd support.
cl349@firebug.cl.cam.ac.uk [Thu, 4 May 2006 23:27:10 +0000 (00:27 +0100)]
Don't try to write to pmd pages, there is no writeable-pmd support.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agoSVM patch for 64bit hv, to reset the ss, es, ds host selectors to NULL
kaf24@firebug.cl.cam.ac.uk [Thu, 4 May 2006 20:24:39 +0000 (21:24 +0100)]
SVM patch for 64bit hv, to reset the ss, es, ds host selectors to NULL
during a context switch to the SVM domain's vcpu. This patch also
initializes the tlb_control to 1 for the initial do_launch().
Signed-off-by: Tom Woller <thomas.woller@amd.com>
19 years agoLinux: upgrade patches to 2.6.16.13.
cl349@firebug.cl.cam.ac.uk [Thu, 4 May 2006 16:44:14 +0000 (17:44 +0100)]
Linux: upgrade patches to 2.6.16.13.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
--HG--
rename : patches/linux-2.6.16/device_bind.patch => patches/linux-2.6.16.13/device_bind.patch
rename : patches/linux-2.6.16/i386-mach-io-check-nmi.patch => patches/linux-2.6.16.13/i386-mach-io-check-nmi.patch
rename : patches/linux-2.6.16/net-csum.patch => patches/linux-2.6.16.13/net-csum.patch
rename : patches/linux-2.6.16/pmd-shared.patch => patches/linux-2.6.16.13/pmd-shared.patch
rename : patches/linux-2.6.16/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch => patches/linux-2.6.16.13/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch
rename : patches/linux-2.6.16/smp-alts.patch => patches/linux-2.6.16.13/smp-alts.patch
rename : patches/linux-2.6.16/x86-increase-interrupt-vector-range.patch => patches/linux-2.6.16.13/x86-increase-interrupt-vector-range.patch
rename : patches/linux-2.6.16/xenoprof-generic.patch => patches/linux-2.6.16.13/xenoprof-generic.patch

19 years agoLinux: upgrade to 2.6.16.13.
cl349@firebug.cl.cam.ac.uk [Thu, 4 May 2006 16:38:25 +0000 (17:38 +0100)]
Linux: upgrade to 2.6.16.13.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agoRemove unused LINUX_SRCS.
cl349@firebug.cl.cam.ac.uk [Thu, 4 May 2006 15:49:58 +0000 (16:49 +0100)]
Remove unused LINUX_SRCS.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agoAdd a HOWTO to help writing tests, includes domains with networking.
stekloff@dyn9047022152.beaverton.ibm.com [Thu, 4 May 2006 13:22:38 +0000 (14:22 +0100)]
Add a HOWTO to help writing tests, includes domains with networking.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
19 years agoAdd new networking infrastructure to Xm-Test. The goal is to make
stekloff@dyn9047022152.beaverton.ibm.com [Thu, 4 May 2006 13:22:29 +0000 (14:22 +0100)]
Add new networking infrastructure to Xm-Test. The goal is to make
creating domains with networking very easy. This patch:

1) Adds new XenDevice class, with the XenNetDevice subclass. These
   classes represent devices for xm-test and are tied to XenDomains.
   This can eventually be used for block devices as well. Currently,
   devices must be added to domains prior to starting the domain. The
   attach and detach needs to be handled.

2) Adds a new NetConfig class to handle configuring the network
   environment in which the tests run. This patch only handles ranges
   of IPs in a bridged environment. DHCP needs to be added as well as
   handling NAT and routed environments.

3) Modifies XenDomain class to handle XenDevices.

4) Adds new configuration options for defining a range of IPs, their
   network address, and their netmask.

5) Removes the old Network.py and Network class.

6) Modifies the existing tests to use the new infrastructure.

7) Adds some documentation to help creating domains.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
19 years agoSecond step toward a new network infrastructure, move XmConsole to be
emellor@leeni.uk.xensource.com [Thu, 4 May 2006 13:22:17 +0000 (14:22 +0100)]
Second step toward a new network infrastructure, move XmConsole to be
in XenDomain. The devices we will add, like network, will need to run
console commands when a domain is started. So I have made console be
a part of domain object, which it's tied to anyway.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
19 years agoFirst step to network infrastructure, add a type to XenDomain to identify
stekloff@dyn9047022152.beaverton.ibm.com [Thu, 4 May 2006 13:20:11 +0000 (14:20 +0100)]
First step to network infrastructure, add a type to XenDomain to identify
it as HVM or PV rather than using the config time option. The forthcoming
XenNetDevice will need to check. This is also the first step toward running
PV and HVM domains at the same time.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
19 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 4 May 2006 13:19:19 +0000 (14:19 +0100)]
Merged.

19 years agoChange Mini-OS so that it uses stddef.h to define size_t and
kaf24@firebug.cl.cam.ac.uk [Thu, 4 May 2006 10:24:19 +0000 (11:24 +0100)]
Change Mini-OS so that it uses stddef.h to define size_t and
NULL. This problem fixes errors that occur when linking Mini-OS with
ANSI standard code that uses stddef.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoThis patch
kaf24@firebug.cl.cam.ac.uk [Thu, 4 May 2006 10:22:19 +0000 (11:22 +0100)]
This patch
- moves the TPM frontend completely into the char/tpm directory where it
is a plug-in to the generic TPM driver
- removes a now obsolete include file
- adapts part of the documentation
- fixes some locking problems where copy_to/from_user was called with
IRQs blocked

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoFix fault handler for both 32 and 64 bit architecture. Clean up unused code.
kaf24@firebug.cl.cam.ac.uk [Thu, 4 May 2006 10:19:27 +0000 (11:19 +0100)]
Fix fault handler for both 32 and 64 bit architecture. Clean up unused code.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Signed-off-by: Aravindh Puthiyaparambil
<aravindh.puthiyaparambil@unisys.com>

19 years agoSVM patch to cleanup the host save area allocation and deallocation,
kaf24@firebug.cl.cam.ac.uk [Thu, 4 May 2006 10:14:45 +0000 (11:14 +0100)]
SVM patch to cleanup the host save area allocation and deallocation,
including removing  memory leaks concerning these areas.  Also fixes
problem where the HSA MSR was not initialized properly for cores>0.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
19 years agoFix xenbus userspace device transaction tracking.
cl349@firebug.cl.cam.ac.uk [Thu, 4 May 2006 09:25:27 +0000 (10:25 +0100)]
Fix xenbus userspace device transaction tracking.
If a transaction end command fails, the semaphore which keeps track
of whether we're in a transaction or not was not getting updated.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
19 years agoFix mismerge of vmx vm86 patch: 9915:e1409c2ace46afd67b54de1f5c0b2b6d3721ca3b
kaf24@firebug.cl.cam.ac.uk [Wed, 3 May 2006 12:33:01 +0000 (13:33 +0100)]
Fix mismerge of vmx vm86 patch: 9915:e1409c2ace46afd67b54de1f5c0b2b6d3721ca3b
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoInstead of knowing explicitly about the pygrub entry option, allow
kaf24@firebug.cl.cam.ac.uk [Wed, 3 May 2006 10:02:30 +0000 (11:02 +0100)]
Instead of knowing explicitly about the pygrub entry option, allow
passing arbitrary options to the bootloader and deprecate the bootentry
option.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
19 years agoIntroduce some finer-grained locking to prevent calling
kaf24@firebug.cl.cam.ac.uk [Wed, 3 May 2006 10:00:57 +0000 (11:00 +0100)]
Introduce some finer-grained locking to prevent calling
copy_from/to_user while preventing interrupts and fix allocation of
memory from within a task and other issues.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoClean up xen-mkbuildtree-pre for ia64 xenlinux.
kaf24@firebug.cl.cam.ac.uk [Wed, 3 May 2006 09:59:54 +0000 (10:59 +0100)]
Clean up xen-mkbuildtree-pre for ia64 xenlinux.
Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com>
19 years agoUse native value for SPLIT_PTLOCK_CPUS except on xen/x86.
kaf24@firebug.cl.cam.ac.uk [Wed, 3 May 2006 09:58:43 +0000 (10:58 +0100)]
Use native value for SPLIT_PTLOCK_CPUS except on xen/x86.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoEnsure segment bases are consistent with their
kaf24@firebug.cl.cam.ac.uk [Wed, 3 May 2006 09:56:19 +0000 (10:56 +0100)]
Ensure segment bases are consistent with their
selectors for VMX guests in VM86 mode.

Signed-off-by: David Lively <dlively@virtualiron.com>
19 years agoTurn page-structure layout assertions into BUILD_BUG_ON().
kaf24@firebug.cl.cam.ac.uk [Wed, 3 May 2006 06:44:20 +0000 (07:44 +0100)]
Turn page-structure layout assertions into BUILD_BUG_ON().
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoXm-tests 01_memset_basic_pos.test and 03_memset_random_pos.test start
emellor@leeni.uk.xensource.com [Tue, 2 May 2006 17:17:59 +0000 (18:17 +0100)]
Xm-tests 01_memset_basic_pos.test and 03_memset_random_pos.test start
domUs with 64MB of memory,
and assume that all of that memory is available in the domU. They then
perform various xm memset tests
based on the assumed starting conditions.

When netback & blkback are comiled into the domU kernel, they eat about
5MB. This mismatch will cause
01_memset_basic_pos.test to fail every time. 03_memset_random_pos.test
will probably fail, but can
pass with some lucky numbers from the random number generator.

This patch changes both tests to read the starting memory allocation from
the balloon driver in the domU.

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
19 years agoBalloon driver should hijack the ->lru list field rather than
kaf24@firebug.cl.cam.ac.uk [Tue, 2 May 2006 16:23:21 +0000 (17:23 +0100)]
Balloon driver should hijack the ->lru list field rather than
adding another list field to every page structure.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoRemove i386/x8664 differences in vmx reg store/load routines.
kaf24@firebug.cl.cam.ac.uk [Tue, 2 May 2006 16:17:15 +0000 (17:17 +0100)]
Remove i386/x8664 differences in vmx reg store/load routines.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoVirtual net drivers advertise multicast capabilities.
kaf24@firebug.cl.cam.ac.uk [Tue, 2 May 2006 14:46:15 +0000 (15:46 +0100)]
Virtual net drivers advertise multicast capabilities.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoThis patch changes to format in which EIP is printed to be consistent on 64-bit regar...
kaf24@firebug.cl.cam.ac.uk [Tue, 2 May 2006 14:36:07 +0000 (15:36 +0100)]
This patch changes to format in which EIP is printed to be consistent on 64-bit regardless of whether the addresses
leading bits are set or clear. It additionally changes the formatting so that trailing spaces are avoided, and it
suppresses the printing of empty records. It also prevents combining records with identical EIP but from different
domains.

It further changes the type of some variables from plain int to unsigned int, as that is yielding more efficient code
on x86-64 (signed 32-bit array indices require explicit sign extension, whereas in most cases an extra copy can be
avoided when the index type is unsigned, since all 32-bit operations already zero-extend their results).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
19 years agoThis patch conditionalizes some output from perfc_printall(), thus making relevant...
kaf24@firebug.cl.cam.ac.uk [Tue, 2 May 2006 14:33:47 +0000 (15:33 +0100)]
This patch conditionalizes some output from perfc_printall(), thus making relevant information more compact and easier
legible. It additionally changes the formatting so that trailing spaces are avoided.

Also changing the type of some variables from plain int to unsigned int, as that is yielding more efficient code on
x86-64 (signed 32-bit array indices require explicit sign extension, whereas in most cases an extra copy can be avoided
when the index type is unsigned, since all 32-bit operations already zero-extend their results).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
19 years agoFix perfc array range on reset.
kaf24@firebug.cl.cam.ac.uk [Tue, 2 May 2006 14:21:19 +0000 (15:21 +0100)]
Fix perfc array range on reset.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
19 years agoMove Linux-specific privcmd code into private libxc implementations.
kaf24@firebug.cl.cam.ac.uk [Tue, 2 May 2006 14:12:06 +0000 (15:12 +0100)]
Move Linux-specific privcmd code into private libxc implementations.
Make header path for kernel's privcmd/evtchn headers generic.
Remove pointless xi_*() interface that was using private libxc
interfaces.

Signed-off-by: John Levon <john.levon@sun.com>
19 years agoRemove obsolete privcmd_blkmsg struct.
kaf24@firebug.cl.cam.ac.uk [Tue, 2 May 2006 08:18:55 +0000 (09:18 +0100)]
Remove obsolete privcmd_blkmsg struct.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
19 years agoFix ia64 build. do_physdev_op* declared incorrectly
kaf24@firebug.cl.cam.ac.uk [Tue, 2 May 2006 08:16:02 +0000 (09:16 +0100)]
Fix ia64 build. do_physdev_op* declared incorrectly
Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com>
19 years agoFix x86/64 version of Mini-OS. It encompasses the following:
kaf24@firebug.cl.cam.ac.uk [Tue, 2 May 2006 08:12:39 +0000 (09:12 +0100)]
Fix x86/64 version of Mini-OS. It encompasses the following:
a) 64-bit switch_to scheduler macro (by Aravindh Puthiyaparambil)
b) implements 64-bit hypervisor_callback
c) fixes thread creation issues (thread_starter used to perform
initialisation)

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
19 years agoClean up compiler.h to define a few more things and update
kaf24@firebug.cl.cam.ac.uk [Mon, 1 May 2006 16:44:51 +0000 (17:44 +0100)]
Clean up compiler.h to define a few more things and update
for gcc4.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoA few functions should be static in shutdown.c.
kaf24@firebug.cl.cam.ac.uk [Mon, 1 May 2006 16:41:02 +0000 (17:41 +0100)]
A few functions should be static in shutdown.c.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoInclude string.h in the hypercall header file to ensure that memcpy() is defined.
kaf24@firebug.cl.cam.ac.uk [Mon, 1 May 2006 16:02:43 +0000 (17:02 +0100)]
Include string.h in the hypercall header file to ensure that memcpy() is defined.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoThe Xen netif drivers won't complile if NET is absent.
kaf24@firebug.cl.cam.ac.uk [Mon, 1 May 2006 14:30:53 +0000 (15:30 +0100)]
The Xen netif drivers won't complile if NET is absent.

Signed-Off-By: Horms <horms@verge.net.au>
19 years agoCompilation fix on ia64. Include linux/vmalloc.h for struct vm_area.
kaf24@firebug.cl.cam.ac.uk [Mon, 1 May 2006 14:29:38 +0000 (15:29 +0100)]
Compilation fix on ia64. Include linux/vmalloc.h for struct vm_area.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoCompilation fix tpmback.c on ia64. Use pfn_to_mfn instead of
kaf24@firebug.cl.cam.ac.uk [Mon, 1 May 2006 14:29:08 +0000 (15:29 +0100)]
Compilation fix tpmback.c on ia64. Use pfn_to_mfn instead of
phys_to_machine_mapping.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoChange semantics of grant transfers for vp guests so that the
kaf24@firebug.cl.cam.ac.uk [Mon, 1 May 2006 14:28:01 +0000 (15:28 +0100)]
Change semantics of grant transfers for vp guests so that the
operation automatically gets you a fresh page at the same
pseudo-physical address as Keir suggested.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoDebugging Xend with XEND_DAEMONIZE set to False doesn't work as
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Apr 2006 08:52:59 +0000 (09:52 +0100)]
Debugging Xend with XEND_DAEMONIZE set to False doesn't work as
expected.  Xend actually creates two children and the XEND_DAEMONIZE
flag only prevents one of the children from being created.  This
patch causes none of the children to be created.  With this patch,
Xend functionality is performed in the process executed from the
command line (i.e., /usr/sbin/xend).  This patch makes it possible to
debug Xend with pdb.

Signed-off-by: Randy Thelen <rthelen@netapp.com>
19 years agoAllow architectures to define their own privcmd_mmap() by
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Apr 2006 08:52:13 +0000 (09:52 +0100)]
Allow architectures to define their own privcmd_mmap() by
introducing HAVE_ARCH_PRIVCMD_MMAP.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoIntroduce XEN_IA64_DOM0_NON_VP to simplify some ifdefs
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Apr 2006 08:50:49 +0000 (09:50 +0100)]
Introduce XEN_IA64_DOM0_NON_VP to simplify some ifdefs
from defined(__ia64__) && !defined(CONFIG_XEN_IA64_DOM0_VP)
to defined(XEN_IA64_DOM0_NON_VP).

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoBalloon driver: when in autotranslate mode, pages are returned
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Apr 2006 08:47:51 +0000 (09:47 +0100)]
Balloon driver: when in autotranslate mode, pages are returned
to xen without traversing init_mm.
This change is needed for xen/ia64 vp model.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoFix blktap "bad page state" bug.
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Apr 2006 08:39:04 +0000 (09:39 +0100)]
Fix blktap "bad page state" bug.

Signed-off-by: Andrew Warfield <andrew.warfield@cl.cam.ac.uk>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoballoon_alloc_empty_page_range() should set the reference count
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Apr 2006 08:32:21 +0000 (09:32 +0100)]
balloon_alloc_empty_page_range() should set the reference count
on every page structure before returning.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoRemove definition of NR_PIRQS and replace all uses with
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Apr 2006 08:26:01 +0000 (09:26 +0100)]
Remove definition of NR_PIRQS and replace all uses with
NR_IRQS. Allows removal of redundant check in pirq_guest_bind().

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoDefine new event-channel and physdev hypercalls with a more extensible
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Apr 2006 08:16:15 +0000 (09:16 +0100)]
Define new event-channel and physdev hypercalls with a more extensible
interface (the legacy hypercalls would break if subcommands with large
argument structures were added, as it would grow the size of the
union of all argument structures).

Also, based on a patch from Kevin Tian, add a new physdev op to
signal EOI for a particular irq.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoWait for the device to be connected on the guest (with a 10s timeout)
vhanquez@kneesa.uk.xensource.com [Fri, 28 Apr 2006 15:44:00 +0000 (16:44 +0100)]
Wait for the device to be connected on the guest (with a 10s timeout)
before detaching it. Fix a race condition that dom0 was tearing down the
block device while the guest was putting it in a Connected state.

Signed-off-by: Vincent Hanquez <vincent@snarc.org>
19 years agoxen/ia64 with dom0 vp model doesn't need the blkbkack ia64 workarounds
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Apr 2006 13:48:50 +0000 (14:48 +0100)]
xen/ia64 with dom0 vp model doesn't need the blkbkack ia64 workarounds
any more.  xen/ia64 dom0 vp model is a big change so that xen/ia64
with the old model (P=M) still remains as the compile option.
Hopefully the work around will be eliminated in the future completely.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoMakefile changes for xen/ia64 with dom0 vp model needs.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Apr 2006 13:47:42 +0000 (14:47 +0100)]
Makefile changes for xen/ia64 with dom0 vp model needs.
xenLinux/ia64 with dom0 vp model needs arch/i386/kernel/swiotlb.o

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoxen/ia64 with dom0 vp model needs direct_remap_pfn_range() to be called
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Apr 2006 13:42:53 +0000 (14:42 +0100)]
xen/ia64 with dom0 vp model needs direct_remap_pfn_range() to be called
for IOCTL_PRIVCMD_MMAPBATCH.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoDefine 8 hypercall numbers for arch-specific purposes.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Apr 2006 13:38:39 +0000 (14:38 +0100)]
Define 8 hypercall numbers for arch-specific purposes.

Signed-off-by: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agoRecent GUEST_HANDLE related cset broke ia64 compilation.
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Apr 2006 13:35:34 +0000 (14:35 +0100)]
Recent GUEST_HANDLE related cset broke ia64 compilation.

Signed-off-by Kevin Tian <kevin.tian@intel.com>

19 years agoWhen boot device is cdrom but the cdrom is not bootable, the guest appears
kaf24@firebug.cl.cam.ac.uk [Fri, 28 Apr 2006 13:33:40 +0000 (14:33 +0100)]
When boot device is cdrom but the cdrom is not bootable, the guest appears
to hang. This patch fixes this by filling in second- and third-priority
fallback boot devices.

Signed-off by: Chen Jun <chenjunb@lenovo.com>